varying vec3 texCoordinate;
uniform sampler2D texture;
uniform float threshold;
void main (void)
{
  vec4 color = texture2D(texture, texCoordinate.xy);
  float luminance = dot(vec4(0.3, 0.59, 0.11, 0.0), color);
  if(luminance > threshold)
    gl_FragColor = vec4(color);
  else
    gl_FragColor = vec4(0.0);
}
